import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', () => {
  // 验证码
  const verificationCode = ref<string>('')

  // 设置验证码
  const setVerificationCode = (code: string) => {
    verificationCode.value = code
  }

  // 清空验证码
  const clearVerificationCode = () => {
    verificationCode.value = ''
  }

  return {
    verificationCode,
    setVerificationCode,
    clearVerificationCode,
  }
})
